1. Field of the Invention
The invention relates to a printer that performs printing via a communication line, and more particularly to a technology that detects abnormal communications and prevents abnormal printing operations.
2. Description of the Related Art
Conventional printers often receive communication data containing abnormal data such as missing data due to noise in the communication lines and/or improper timings in data communications between a printer and a host apparatus.
In order to prevent abnormal data from being printed, printing may be stopped when undefined print commands are received. However, if an undefined command has become erroneously garbled into a normal command due to data collection or extraction faults, the error cannot be detected. The result is advertent printing of abnormal data.
Another drawback is that even if print data has become garbled into control data such as new page control, the “new page control” is a defined control command and therefore cannot be interpreted as a garbled command. The result is that pages are broken every time several words are printed, outputting a large number of pages.
One way of avoiding the aforementioned drawbacks is to use the fact that it is rare to print only one line at the top of a page if printing is normally performed. In other words, if there is only one line at the top of a page of a document that is being created, received data is interpreted as abnormal data and the following data is discarded.
However, it is not always abnormal that a page ends with only one line at the top. Therefore, printing of abnormal data cannot be prevented by discarding the following data if there is only one line at the top of a page.
Another way of avoiding the aforementioned drawback is to perform parity check and error correction of data. However, such error check is not performed in the Centronics interface for general purposes, and therefore parity check and error correction of data cannot prevent abnormal data from being printed.